Artificial-intelligence-developed sleep warning